package com.hope.photoviewer.preview;

import android.content.Context;
import android.graphics.Bitmap;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

/**
 * @author xwAnd
 * @date 2017/12/6
 */

public class GlideImageLoader implements ImageLoader {

    private static GlideImageLoader loader;

    @Override
    public void onDisplayImage(Context context, ImageView imageView, String url) {
        Glide.with(context).load(url).into(imageView);
    }

    @Override
    public Bitmap getCacheImage(String url) {
        return null;
    }

    public static GlideImageLoader getImageLoader() {
        if (loader == null) {
            loader = new GlideImageLoader();
        }
        return loader;
    }
}
